﻿using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;

namespace Rabbit.API.Controllers
{
    /// <summary>
    /// 扩展方法控制器
    /// </summary>
    [Route("api/[controller]/[action]")]
    [ApiController]
    public class DemoController : ControllerBase
    {

        /// <summary>
        /// 序列化方法
        /// </summary>
        [HttpGet]
        public string Getstrway()
        {
            var list = new List<int>(){ 1,2,3,4,5,6,7,8,9,10};       
            return list.Getstr() ;
        }
        /// <summary>
        /// 反序列化方法 
        /// </summary>
        [HttpGet]
        public List<int> Getlistway()
        {
            var number = "[1,2,3,4,5,6,7,8,9,10]";
            return number.Getlist();
        }
        /// <summary>
        /// 雪花编号
        /// </summary>
        [HttpGet]
        public long SnowIdway()
        {
            long id = 0;
            return id.GetSnowId();
        }
    }
}
